/**
 * 全局常量、方法封装模块
 * 通过原型挂载到Vue属性
 * 通过this.Global调用
 */

window.g = {
    IP: "192.168.3.92",
    RATEHEART: false,
    servicePort: 8002,
    socketPort: 8762
  };
  
let serverIp = window.g.IP;
let servicePort = window.g.servicePort;
let socketPort = window.g.socketPort;

// 后台服务器地址
export const baseUrl = 'http://' + serverIp + ":" + servicePort;
export const webSockUrl = "ws://" + serverIp + ":" + socketPort + "/websocket/socketServer.do";
export const webSockWarnUrl = "ws://" + serverIp + ":" + servicePort + "/websocket/alarmPush.do";
export const webSockStatisticsUrl = "ws://" + serverIp + ":" + socketPort + "/websocket/statistic";
export const webSockMonitorUrl = "ws://" + serverIp + ":" + servicePort + "/realTimeCameraSocket/realTimeCamera";
export const cameraServerUrl = "http://" + serverIp + ":" + servicePort;
export const statisticsUrl = "http://" + serverIp + ":" + servicePort;
export const displaySearchUrl = "http://" + serverIp + ":" + socketPort;
export const resourceAnalysisUrl = "http://" + serverIp + ":" + servicePort + "/";
export const dataBaseUrl = "http://" + serverIp + ":" + servicePort + "/";
export const TagManageUrl = "http://" + serverIp + ":" + servicePort + "/";
export const sysUserUrl = "http://" + serverIp + ":" + servicePort + "/";

export const webSockHomePage = "ws://" + serverIp + ":" + servicePort + "/statDataSocket/resourceAndAlarmSocket";

// 心率是否显示
export const rateHeartShow = window.g.RATEHEART;


export default {
  baseUrl,
  webSockUrl,
  webSockWarnUrl,
  webSockStatisticsUrl,
  cameraServerUrl,
  displaySearchUrl,
  resourceAnalysisUrl,
  dataBaseUrl,
  TagManageUrl,
  sysUserUrl,
  rateHeartShow,
  webSockHomePage,
}
